package cn.handong.tool.Java文件操作;

import cn.handong.tool.沪房.HouseData;
import com.alibaba.excel.EasyExcel;
import org.junit.Test;

import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

public class 读取Excel {
    //中建熙江岳
    @Test
    public void readExcelAndWriteTxt() {
        String fileName = "xjy.xlsx";//这里的文件要放在src所在目录下
        List<HouseData> list = EasyExcel.read(fileName)
                .head(HouseData.class)
                .sheet()
                .headRowNumber(1)
                .doReadSync();
        System.out.println(list);
    }
}
